Skip to content

Unit testing: Add Monte Carlo testing to ciphers#10213

Merged
dgarske merged 1 commit intowolfSSL:masterfrom
SparkiDev:api_test_cipher_algs_2
Apr 14, 2026
Merged

Unit testing: Add Monte Carlo testing to ciphers#10213
dgarske merged 1 commit intowolfSSL:masterfrom
SparkiDev:api_test_cipher_algs_2

Conversation

@SparkiDev
Copy link
Copy Markdown
Contributor

@SparkiDev SparkiDev commented Apr 13, 2026

Description

Monte Carlo testing is randomized test data.
These new tests have random keys, IVs, nonce, etc and random data to encrypt.
100 sets of random test data are encrypted and decrypted with a check to ensure the input to encrypt is the same as the output of decrypt. Tags are generated and checked in the calls to encrypt and decrypt.

Testing

./configure --disable-shared --enable-all --enable-rc2 --enable-aesofb
or
Get wolfsm
cd wolfsm
./install.sh
cd ../wolfssl
./configure --disable-shared --enable-all --enable-rc2 --enable-aesofb --enable-sm4-ecb --enable-sm4-cbc --enable-sm4-ctr --enable-sm4-gcm --enable-sm4-ccm

@SparkiDev SparkiDev self-assigned this Apr 13, 2026
@SparkiDev SparkiDev force-pushed the api_test_cipher_algs_2 branch 4 times, most recently from a2f2707 to 1e60479 Compare April 14, 2026 02:31
Monte Carlo testing is randomized test data.
These new tests have random keys, IVs, nonce, etc and random data to
encrypt.
100 sets of random test data are encrypted and decrypted with a check to
ensure the input to encrypt is the same as the output of decrypt.
Tags are generated and checked in the calls to encrypt and decrypt.
@SparkiDev SparkiDev force-pushed the api_test_cipher_algs_2 branch from 1e60479 to 59a17dd Compare April 14, 2026 03:25
@SparkiDev
Copy link
Copy Markdown
Contributor Author

retest this please

Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #10213

No scan targets match the changed files in this PR. Review skipped.

@dgarske dgarske merged commit e3e95c0 into wolfSSL:master Apr 14, 2026
388 of 389 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants